The present invention relates to a method and system for controlling a disk control unit in a variable-length formatted disk system. More particularly, the present invention relates to an emulation technique that effectively allows an upper system employing a variable-length disk to perform high-speed access to an objective data using a fixed-length disk unit and the disk control unit including a cache.
In a conventional technique, when the variable-length disk is emulated using the fixed-length disk unit, a plurality of blocks in the fixed-length disk are assigned to a capacity equivalent to one track in the variable-length disk. Then, within the plurality of blocks thus assigned and for each record in the variable-length disk, a format information area and a data area are located and stored in accordance with a certain rule.
When performing an access to a record in such a system, data in the entire tracks to be accessed, first of all, had to be read into a buffer or the cache existing within the disk control unit. Then, after analyzing formats therein and determining a position of the object record, the access has to be executed.
In such a conventional technique, even when a single record within a track is read out, the data in the entire tracks have to be read out once, and then, after the data are analyzed within the disk control unit, the object record has to be transmitted up to the upper system.
Also, when executing a writing toward the disk, in order to determine a writing position before the writing process, the data in the entire tracks need to be read out, and after that, the writing is executed into the disk. Namely, it turns out that, in the one input/output process, the two accesses have to be performed to the disk unit.
In this way, when executing the emulation of the variable-length disk, the loads onto the disk operation are increased. This has become a problem on the performance thereof.
It is an object of the present invention to make it unnecessary to perform, when the variable-length disk is emulated using the fixed-length disk unit, the extra disk accesses at the time of reading/writing to the fixed-length disk unit.
In order to accomplish the above object, according to an aspect of the present invention, there is provided a disk system including a disk control unit connected to an upper system and emulating a variable-length formatted disk with the use of a fixed-length formatted disk, the upper system using the variable-length formatted disk that employs as its access unit a variable-length record including a format information area and a data area, the fixed-length formatted disk employing a constant-sized block as its access unit, and a fixed-length formatted disk unit controlled by the disk control unit, wherein said disk unit includes a format information area storing a region in which the format information areas are stored, and the disk control unit has means, for separating the format information areas which exist in the variable-length formatted records, from all the records and storing all the separated format information areas into the format information area storing region in the disk unit.
Also, the disk control unit includes a cache memory, means for storing the format information areas, which are stored in the format information area storing region in the disk unit, into the cache memory at the time of a reset processing of the disk system, and means for referring to the format information areas in the cache memory so as to search an object record when an access is executed from the upper system to the disk unit, thereby allowing an access to the disk unit to be executed only to the target record thus searched.
Also, the format information area has an identifier establishing a search condition for a record, block number indicating a storage position within the disk unit, and data length information indicating size of the data area.